package com.yangguang.huahui.ui.activitys;

import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.TextView;

import com.yangguang.huahui.R;
import com.yangguang.huahui.ui.fragments.MyQuestionFragment;
import com.yangguang.huahui.ui.fragments.WendaFragment;


import butterknife.BindView;
import butterknife.OnClick;

public class ReplyActivity extends BaseActivity{
    @BindView(R.id.tv_title)
    TextView tv_title;
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();

    @OnClick({R.id.iv_back})
    void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_back:
                finish();
                break;
        }
    }
    @Override
    protected int initLayoutId() {
        return R.layout.activity_reply;
    }

    @Override
    protected void initView() {
        switch (getIntent().getIntExtra("type", 0)){
            case 1://问答列表
                ft.add(R.id.mFL_content, new WendaFragment()).commit();
                break;
            case 2://我的提问列表
                ft.add(R.id.mFL_content, new MyQuestionFragment()).commit();
                break;
            case 3://我的回答列表
                break;
        }
        tv_title.setText(getIntent().getStringExtra("title"));
    }

    @Override
    protected void initData() {

    }

}
